@page "/"
@namespace blagario.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>blagario</title>
    <base href="~/" />
    <link href="css/site.css" rel="stylesheet" />
</head>
<body>
    <app>@(await Html.RenderComponentAsync<App>(RenderMode.Server))</app>

    <script src="_framework/blazor.server.js"></script>

    <script>

        window.AreaResized = (DotNetRef) =>
        {
            window.addEventListener("resize", 
                () => {DotNetRef.invokeMethodAsync('OnBrowserResize').then(data => data);} );
            
        }

        window.GetSize = () => {
            var x = window.innerWidth;
            var y = window.innerHeight;        
            return [ x , y ];
        };

        window.SetFocusToUniverse = () => {
            console.log("setting focus");
            document.getElementById("universe").focus();
        };
    </script>

</body>
</html>
